import decodeUTF8 from '../utils/utf8-conv'

let le = (function () {
    let buf = new ArrayBuffer(2)
    (new DataView(buf)).setInt16(0, 256, true) // little-endian write
    return (new Int16Array(buf))[0] === 256 // platform-spec read, if equal then LE
})()

// 解析flv scriptdata

class AMF {
    static parseScriptData(arrayBuffer, dataOffset, dataSize) {

    }

    static parseObject(arrayBuffer, dataOffset, dataSize) {

    }

    static parseVariable(arrayBuffer, dataOffset, dataSize) {

    }

    static parseString(arrayBuffer, dataOffset, dataSize) {}
    static parseLongString(arrayBuffer, dataOffset, dataSize) {}
    static parseDate(arrayBuffer, dataOffset, dataSize) {}
    static parseValue(arrayBuffer, dataOffset, dataSize) {}
}

export default AMF